import axios from "axios";

export function request(config) {
    let axiosInstance = axios.create({
        // baseURL: 'http://152.136.185.210:7878/api/m5',
        baseURL: 'http://47.106.205.4:7017/api',
        timeout: 5000
    });
    axiosInstance.interceptors.request.use(config => {
        return config;
    }, err => {
        console.log(err);
    })
    axiosInstance.interceptors.response.use(res => {
        return res.data;
    }, err => {
        console.log(err);
    })
    return axiosInstance(config);
}
